home *** CD-ROM | disk | FTP | other *** search
/ PC Home 138 / PC Home issue 138.iso / Software / Essentials / Netscape / nim.xpi / bin / chrome / aim.jar / content / aim / RenameBuddy.js < prev    next >
Encoding:
Text File  |  2002-04-24  |  845 b   |  31 lines

  1. var groupname;
  2. var contact;
  3.  
  4. function AimRenameBuddyWndOnLoad()    
  5. {
  6.   groupname=window.arguments[0];
  7.   contact=window.arguments[1];
  8.   doSetOKCancel(RenameBuddy, 0);        // xul overlay
  9.     if(contact) {
  10.     var title=document.getElementById("RenameBuddy").getAttribute("title");
  11.     document.getElementById("RenameBuddy").setAttribute("title", title+contact)
  12.         document.getElementById("fldContactName").value=contact;
  13.     return;
  14.   }
  15. }
  16.  
  17. function RenameBuddy()
  18. {
  19.     var fldDisplay = top.document.getElementById("fldDisplayName");
  20.     var display = fldDisplay.value;
  21.   if ((display - 0) > 0) {
  22.       // Display name field should not be a number - enough with icq numbers!
  23.       aimErrorBox(aimString("msg.EnterCharDisplay"));
  24.           return;
  25.     }
  26.   aimBuddyManager().RenameBuddy(groupname, contact, display);
  27.   window.close();
  28.   
  29. }
  30.  
  31.